<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>

    .center {
        width: 100px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .loading {
        width: 80px;
        height: 80px;
        background: wheat;
        margin: auto;
        display: flex;
        /* justify-content: space-between;
        align-items: center; */
    }

    .loading .item {
        position: absolute;
        left: 45px;
        border-radius: 50%;
        width: 10px;
        height: 10px;
        background: red;
        transform: rotate(calc(45deg * var(--i)));
        transform-origin: center 40px;
        animation: changeColor 1.2s ease infinite;
        animation-delay: calc(0.06s * var(--i));
    }
    @keyframes changeColor {
        0% {
            opacity: 1;
        }
        100%{
            opacity: .2;
        }
    }

</style>
<body>
    
    <div class="center">
        <div class="loading">
            <div class="item" style="--i: 1"></div>
            <div class="item" style="--i: 2"></div>
            <div class="item" style="--i: 3"></div>
            <div class="item" style="--i: 4"></div>
            <div class="item" style="--i: 5"></div>
            <div class="item" style="--i: 6"></div>
            <div class="item" style="--i: 7"></div>
            <div class="item" style="--i: 8"></div>
        </div>
    </div>

</body>
</html>